<?php

namespace App\Http\Requests\Admin\Customer\Suggest;

use App\Http\Requests\ApiRequest;

class HmSkinSuggestStoreRequest extends ApiRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'hm_skin_suggests'                  => 'required|array|size:3', // 语言数组
            'hm_skin_suggests.*'                => 'required|array|size:4', // 部位数组
            'hm_skin_suggests.*.*'              => 'required|array|size:3', // 检测项数组
            'hm_skin_suggests.*.*.3'            => 'required|array|size:5', // 分数阶段数组
            'hm_skin_suggests.*.*.2'            => 'required|array|size:6', // 分数阶段数组
            'hm_skin_suggests.*.*.1'            => 'required|array|size:6', // 分数阶段数组
            'hm_skin_suggests.*.*.*.*'          => 'required|array|size:3', // 测肤建议数组
            'hm_skin_suggests.*.*.*.*.title'    => 'required|string',
            'hm_skin_suggests.*.*.*.*.analysis' => 'required|string',
            'hm_skin_suggests.*.*.*.*.suggest'  => 'required|string',
        ];
    }
}
